<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon">
	<link rel="stylesheet" href="static/css/common.css">
	<script type="text/javascript" src="static/vendors/jquery/jquery-3.1.1.min.js"></script>
	<script type="text/javascript" src="static/js/tools.js"></script>
	<script type="text/javascript" src="static/js/index.js"></script>
	<title>Mars-SSO单点认证系统</title>
	
	<script type="text/javascript">
	$(function() {
		$("#login").click(function() {
			var u = $("input[name=username]").val() ;
			var p = $("input[name=password]").val() ;
			
			$.ajax({
				url: '/boss/login',
				type: 'POST',
				data: {'username': u, 'password': p},
				dataType: 'JSON',
				success: function(result) {
					console.info(result) ;
					if(result.status) {
						var redirectURL = $.WebTools.request.QueryString("redirectURL") ;
						if(null == redirectURL || redirectURL == "") {
							window.location.href = "http://manager.mars.com" ;
						} else {
							window.location.href=decodeURIComponent(redirectURL) ;
						}
					}
				},
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					console.info("系统异常" + textStatus);
				}
			});
			
		});
	});
	</script>
</head>
<body>
	<div style="width: 100%; height: 80px;text-align: center;border-bottom: 1px solid #333;padding-top:20px;">
		<h1>Mars-SSO单点认证系统-后台管理系统登陆</h1>
	</div>
	<form>
		用户名：<input type="text" name="username" value="0001"><br>
		密&nbsp;&nbsp;&nbsp;码：<input type="text" name="password" value="123456"><br>
	</form>
	<button id="login" style="width: 100px;height: 50px;">登录</button>
	
</body>
</html>